/public/Tools/Python Scripts/renderTex/


Name Type Size Date
../ Directory
--== READ ME ==-- readme 4kb 19-Jul-2026
 
rendertex.bat bat 40b 15-July-2026
rendertex.py py 46kb 15-July-2026
rendertex_example.jpg jpg 329kb 19-Jul-2026

rendertex_example.jpg

--== READ ME ==--.txt

This is a tool that will input textureX definitions and render any textures that use more than 1 patch into a single bitmap, as in a single patch texture. 

It also will build doomtool-style texture definitions with the command --clean

It can read patches from wads and source dirs, and you can input your own palettes if needed. Otherwise it takes the palette from the input wads, or the iwad.

Also, it uses the standard iwad alias I put in all my scripts, just edit the script, and at the top you can put in paths to your iwads, so instead of --iwad "c:\path\to\doom2.wad" you can type --iwad doom2

Why dose this exist?

Well, I love editing in patches, as it allows me to design textures on the fly as I map. One of the things I like to do is make flats in the patch editor based off my wall textures. I always name these as a temporary texture name in the patch editor, like flat_001. 

running a command like
rendertex texture1.txt -iwad doom2 -tex flat_* --clean

will render all those patch-flats as proper flat files, as well as clean all those temp entries from the texture definition itself. (everything is non-destructive as it creates new files)

======

rendertex  —  Doom multi-patch texture renderer

Composites multi-patch textures from a definition file and writes RGBA PNGs.

USAGE
  rendertex <deffile> [deffile2 ...] [-patches <src> ...] [-iwad <alias|path>] [-pal <palfile>] [-tex <name|glob> ...]

INPUTS
  <deffile> ... One or more texture definition files.
                       Accepted formats (auto-detected):
                         WAD    WAD containing TEXTURE1/TEXTURE2 + PNAMES
                         SLADE  SLADE WallTexture text export
                         DoomTools  DoomTools / DEUTEX text definition

OPTIONS
  -patches <src> Patch source(s): WAD files, directories (recursive),
                       or IWAD aliases — any mix, space separated.
                       Lookup order: directories first (CLI order), then
                       WADs (CLI order), then input WAD, then -iwad.
                       First match found is used.
                       Omit entirely to use just the input WAD + -iwad.

  -iwad <alias|path> Base IWAD for secondary patch lookup and palette fallback.
                       Accepts an alias (doom | doom2 | tnt | plutonia | heretic | hexen | free1 | free2) or a path.
                       Default: doom2

  -pal <palfile> Explicit palette file (overrides -iwad palette).
                       Accepts: WAD with PLAYPAL, raw .pal, JASC .pal,
                         DoomTools 256-wide PNG, SLADE pal0 grid.

  -tex <name> ... Render only the listed texture name(s). Accepts globs.
                       e.g.  -tex BIGDOOR1 BIGDOOR2
                             -tex SW1* SW2*
                             -tex *DOOR*

  -clean        Also write three DoomTools definition files into each
                       output dir (bare — no comments, ready to paste):
                         _cleaned_*.txt   full definition minus rendered textures
                         _removed_*.txt   only the rendered textures (original defs)
                         _rendered_*.txt  rendered textures as new single-patch entries
                       AASTINKY/AASHITTY are excluded from all three unless +stinky
                       is given, which pins them first in each file instead.
                       +stinky is ignored without -clean.

  -verbose / -v List every rendered texture, grouped by the patch
                       source(s) that supplied its patches, plus a
                       Not Found group for missing-patch skips.

  -h / -help Show this help.

OUTPUT
  One output directory per input definition file, named _stem:
    doom2.wad        →  _texture1/  and  _texture2/
    TEXTURES.txt     →  _TEXTURES/
    floorWall.txt    →  _floorWall/

  Only multi-patch textures are rendered.
  Output PNGs are RGBA — residual transparency is preserved.
  Filenames are uppercase: BIGDOOR1.png

PALETTE RESOLUTION ORDER
  1. PLAYPAL from the input definition WAD (if WAD input)
  2. PLAYPAL from a -patches WAD (first found, CLI order)
  3. -pal explicit file
  4. PLAYPAL from -iwad
  5. Error — names the specific patch that needs decoding

EXAMPLES
  # Render all multi-patch textures from doom2.wad using a patch dir
    rendertex doom2.wad -patches patches/ -iwad doom2

  # Render from a SLADE text export, patches from a WAD
    rendertex myTextures.txt -patches texwad.wad

  # Only render door and switch textures
    rendertex doom2.wad -patches patches/ -tex BIGDOOR* SW1*

  # Multiple defs; patch chain = d:\patchdir -> tnt.wad -> btw.wad -> doom2 iwad
    rendertex base.txt extra.txt -patches tnt d:\patchdir btw.wad -iwad doom2

  # Explicit palette file
    rendertex myDefs.txt -patches texwad.wad -pal mypal.pal

  # No -patches at all: everything resolves from the doom2 IWAD
    rendertex texture1.txt -iwad doom2